<?php 
namespace Wdl\validate;
 
 class demandValidate extends Validate
{
  
    protected $filter = [
        'name' => 'trim'
    ];
   
    protected $rule = [
        'area' => 'required',
        'area_quan' => 'required',
        'village_name'=> 'required',
        'huxing'=> 'required',
        'nickname'=>'required',
        'price'=> 'required',
        'mobile'=> 'required|mobile',
        'send_type'=> 'required',
    ];
    
    protected $message = [
        'area.required' => '请输入区域',
        'area_quan.required' => '请输入区域',
        'huxing.required'=> '请输入户型',
        'village_name.required'=> '请输入小区',
        'nickname.required'=>'请输入您的称呼',
        'nickname.min'=>'称呼长度2-20字符',
        'nickname.max'=>'称呼长度2-20字符',
        'price.required'=> '请输入价格',
        'mobile.required'=> '请输入联系手机号',
        'mobile.mobile'=> '手机号格式不正确',
        'send_type.required'=> '请输入发布类型',
    ];  

    protected $scene = [
        'xuqiu' => ['area', 'area_quan','huxing', 'nickname','price','mobile','send_type'],
        'sell' => [ 'village_name','huxing','price','nickname','mobile','send_type']
    ];
}
